<template>
  <div class="header">
    <div class="input-left">
      <div class="iconfont back-icon">&#59203;</div>
    </div>
    <div class="input">
      <span class="iconfont search-icon">&#59315;</span>搜索景点门票
    </div>
    <router-link to="/city">
      <div class="input-right">
        {{this.city}}
        <span class="iconfont irrow-icon">&#58954;</span>
      </div>
    </router-link>
  </div>
</template>
<script>
import { mapState } from 'vuex'
export default {
  name: 'homeHeader',
  computed: {
    ...mapState(['city'])
  }
}
</script>
<style lang='stylus' scoped>
@import '~styles/varibles.styl';

.header {
  display: flex;
  line-height: $headerHeight;
  background-color: $bgColor;
  color: #fff;

  .input-left {
    width: 0.64rem;
    float: left;

    .back-icon {
      width: 0.64rem;
      text-align: center;
      font-size: 0.6rem;
      margin-left: 0.1rem;
    }
  }

  .input {
    flex: 1;
    margin-top: 0.12rem;
    margin-left: 0.2rem;
    padding-left: 0.1rem;
    height: 0.63rem;
    line-height: 0.64rem;
    background-color: #fff;
    border-radius: 0.1rem;
    color: #ccc;

    .search-icon {
      margin-right: 0.1rem;
    }
  }

  .input-right {
    min-width: 1.24rem;
    margin-left: 0.08rem;
    float: right;
    text-align: center;
    color: #fff;

    .irrow-icon {
      font-size: 0.26rem;
    }
  }
}
</style>
